package com.yuyou.train.user;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.yuyou.train.util.tool.SpringUtil;

import feign.Logger;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableSwagger2
@EnableFeignClients(basePackages = {
"com.yuyou.train.service.api.admin.service",
"com.yuyou.train.service.api.lesson.service"})
@EnableDiscoveryClient
@SpringBootApplication
@EnableTransactionManagement
public class TrainUserApplication {

	
    @Bean
    public SpringUtil springUtil(){
    	return new SpringUtil();
    }
	
    @Bean
    public Logger.Level feignLoggerLevel() {
        return feign.Logger.Level.FULL;
    }
    
	public static void main(String[] args) {
		SpringApplication.run(TrainUserApplication.class, args);
	}
}
